#ifndef VOLUMEBUTTON_H
#define VOLUMEBUTTON_H

#include "mypushbutton.h"

class CVolumeSliderDlg;
class VolumeButton : public MyPushButton
{
    Q_OBJECT
public:
    explicit VolumeButton(QWidget *parent = nullptr);
    ~VolumeButton();
    virtual void enterEvent(QEvent *event) override;
    virtual void leaveEvent(QEvent *event) override;
    void setMute(bool mute);
    void setVolume(int volume);
    void showSlider(QEvent *event);
    void        mousePressEvent(QMouseEvent* ev) override;
    void  timerEvent(QTimerEvent *event) override;
public slots:
    void on_VolumeChanged(int value);
signals:
    void volume_changed(int value);
    void init_volume(int value);
    void init_mute(bool mute);
private:
    CVolumeSliderDlg* m_pSliderDlg;
    int         m_timerId;
    bool        m_mute;
};

#endif // VOLUMEBUTTON_H
